Produced by Araxis Merge on 2023-03-13 03:01:08 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | 2023-03-13 03:01:08 +0000 | ||
| 2 | Porto v4.0.5/Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Porto/web/js | apear.js | 2022-12-02 08:40:55 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 77 |
| Removed | 0 | 0 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | /** | |||||
| 2 | * | |||||
| 3 | * Do not edit or add to this file if you wish to upgrade this extension to newer | |||||
| 4 | * version in the future. | |||||
| 5 | * | |||||
| 6 | */ | |||||
| 7 | window.theme = {}; | |||||
| 8 | define([ | |||||
| 9 | 'jquery' | |||||
| 10 | ], function ($) { | |||||
| 11 | "use strict"; | |||||
| 12 | theme = theme || {}; | |||||
| 13 | ||||||
| 14 | var checks = [], | |||||
| 15 | timerId = false, | |||||
| 16 | one, | |||||
| 17 | a, b, o, x, y, ax, ay, | |||||
| 18 | retryCounter = 0, | |||||
| 19 | has_event = false; | |||||
| 20 | ||||||
| 21 | var checkAll = function() { | |||||
| 22 | if (!checks.length) { | |||||
| 23 | if (retryCounter > 10) { | |||||
| 24 | window.removeEventListener('scroll', checkAll); | |||||
| 25 | window.removeEventListener('resize', checkAll); | |||||
| 26 | } | |||||
| 27 | retryCounter++; | |||||
| 28 | } else { | |||||
| 29 | for ( var i = checks.length; i--; ) { | |||||
| 30 | one = checks[i]; | |||||
| 31 | a = window.pageXOffset; | |||||
| 32 | b = window.pageYOffset; | |||||
| 33 | o = one.el.getBoundingClientRect(); | |||||
| 34 | x = o.left + a; | |||||
| 35 | y = o.top + b; | |||||
| 36 | ax = one.options.accX; | |||||
| 37 | ay = one.options.accY; | |||||
| 38 | ||||||
| 39 | if (y + o.height + ay >= b && | |||||
| 40 | y <= b + window.innerHeight + ay && | |||||
| 41 | x + o.width + ax >= a && | |||||
| 42 | x <= a + window.innerWidth + ax) { | |||||
| 43 | ||||||
| 44 | one.fn.call(one.el, one.data); | |||||
| 45 | checks.splice(i, 1); | |||||
| 46 | } | |||||
| 47 | } | |||||
| 48 | } | |||||
| 49 | timerId = false; | |||||
| 50 | }; | |||||
| 51 | ||||||
| 52 | window.theme.appear = function(el, fn, options) { | |||||
| 53 | var settings = { | |||||
| 54 | data: undefined, | |||||
| 55 | accX: 0, | |||||
| 56 | accY: 0 | |||||
| 57 | }; | |||||
| 58 | ||||||
| 59 | if ( options ) { | |||||
| 60 | options.data && ( settings.data = options.data ); | |||||
| 61 | options.accX && ( settings.accX = options.accX ); | |||||
| 62 | options.accY && ( settings.accY = options.accY ); | |||||
| 63 | } | |||||
| 64 | ||||||
| 65 | checks.push({ el: el, fn: fn, options: settings }); | |||||
| 66 | if ( ! timerId ) { | |||||
| 67 | timerId = theme.requestTimeout(checkAll, 100); | |||||
| 68 | } | |||||
| 69 | ||||||
| 70 | if ( ! has_event ) { | |||||
| 71 | $( document.body ).on( 'appear_refresh', checkAll ); | |||||
| 72 | window.addEventListener('scroll', checkAll, {passive: true}); | |||||
| 73 | window.addEventListener('resize', checkAll); | |||||
| 74 | has_event = true; | |||||
| 75 | } | |||||
| 76 | } | |||||
| 77 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.